import Vue from 'vue'
import Router from 'vue-router'
// import Home from '@/pages/home/Home'
// import Detail from '@/pages/detail/detail'
// import City from '@/pages/city/city'

//如果app.js组件特别大的时候建议改为异步组件按需加载的方式（）=>import
//path: '/Detail/:id'带参数跳转
Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Home',
      component: () =>
        import ('@/pages/home/Home')
    },
    {
      path: '/Detail',
      name: 'Detail',
      component: () =>
        import ('@/pages/detail/detail')
    },
    {
      path: '/City',
      name: 'City',
      component: () =>
        import ('@/pages/city/city')
    }
  ]
})
